package com.qfedu.service.impl;

import com.qfedu.dao.LoanDao;
import com.qfedu.dao.impl.LoanDaoImpl;
import com.qfedu.pojo.Loan;
import com.qfedu.pojo.MyLoan;
import com.qfedu.service.LoanService;

import java.math.BigDecimal;
import java.util.List;

public class LoanServiceImpl implements LoanService {
    private LoanDao loanDao=new LoanDaoImpl();
    @Override
    public List<Loan> findAllLoan() {
        return loanDao.findAllLoan();
    }

    @Override
    public Loan findLoanById(int pid) {
        return loanDao.findLoanById(pid);
    }

    @Override
    public void addLoan(String idcode, int pid, BigDecimal price,int back,String pname, int loan_f) {
        loanDao.addLoan(idcode,pid,price,back,pname,loan_f);
    }

    @Override
    public List<MyLoan> findMyLoan(String idcode) {
        return loanDao.findMyLoan(idcode);
    }
}
